
<?php echo $this->Html->css('select2',array('inline'=>false)); ?>

<!--  -->


<section id="content">
        <section class="main padder">
            <div class="clearfix">
                <h4><i class="fa fa-edit"></i>Add new email</h4>
            </div>

            <div class="row">
                    <section class="panel">
                        <div class="panel-body">
                            <form  class="form-horizontal" method="get" data-validate="parsley">
                                <div class="form-group">
                                    <label class="col-lg-3 control-label">Email Title</label>
                                    <div class="col-lg-8">
                                       <?php echo $this->Form->input('title', array('placeholder'=>'tiêu đề email', 'class'=>'bg-focus form-control', 'data-required'=>'true','type'=>'text','data-type'=>'', 'label'=> false,'div'=> false)); ?>
                                    </div> 

                                </div>

                                 <div class="form-group">
                                    <label class="col-lg-3 control-label">Email Content</label>
                                    <div class="col-lg-8">
                                         <?php echo $this->Form->textarea('contentemail', array('placeholder'=>'Nội dung emails', 'class'=>'form-control', 'data-trigger'=>'keyup', 'rows' => '5', 'cols' => '5', 'label'=>''));
                                        ?>
                                    </div>
                                </div>
<a href="javascript:void(0)" ></a>
                                <div class="form-group">
                                    <div class="col-lg-9 col-lg-offset-3">
                                        
                                        <button  class="btn btn-primary" id="create_new_email_next" name="create_new_email_next"
                                        data-toggle="modal" href="#modalgroup">Next</button>
                                    </div>
                                </div> 
                            </form>
                                 
                        </div>   
                    </section>
            </div>
        </section>
</section>

<div id="modalgroup" class="modal fade">
<form class="m-b-none">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><i class="fa fa-times"></i></button>
                <h4 class="modal-title" id="myModalLabel">select group to send email</h4>
            </div>
            <div class="modal-body" >
                <div class="table-responsive">
                    <table class="table table-striped b-t text-small">
                        <thead>
                            <tr>
                                <th width="20">
                                    <input type="checkbox"></th>
                                <th class="th-sortable" data-toggle="class">Group <span class="th-sort"><i class="fa fa-sort-down text"></i><i class="fa fa-sort-up text-active"></i><i class="fa fa-sort"></i></span></th>
                                <th width="30"></th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php
                            foreach($list_group as $k => $v){
                                ?>
                                <tr>
                                    <td><input type="checkbox" name="post[]" id="post" value="<?php echo $k; ?>"></td>
                                    <td><?php echo $v; ?></td>
                                    <td><a href="#" class="active" data-toggle="class"><i class="fa fa-check fa-lg text-success text-active"></i><i class="fa fa-times fa-lg text-danger text"></i></a></td>
                                </tr>

                            <?php
                            }
                            ?> 
                        </tbody>
                    </table>
                </div>
                <footer class="panel-footer">
                    <div class="row">
                        <div class="col-sm-4 hidden-xs">
                        </div>
                        <div class="col-sm-3 text-center"><small class="text-muted inline m-t-small m-b-small">showing 20-30 of 50 items</small> </div>
                        <div class="col-sm-5 text-right text-center-sm">
                            <ul class="pagination pagination-small m-t-none m-b-none">
                                <li><a href="#"><i class="fa fa-chevron-left"></i></a></li>
                                <li><a href="#">1</a></li>
                                <li><a href="#">2</a></li>
                                <li><a href="#">3</a></li>
                                <li><a href="#"><i class="fa fa-chevron-right"></i></a></li>
                            </ul>
                        </div>
                    </div>
                </footer>

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-sm btn-default" data-dismiss="modal" id="sendemail">Send </button>
                <button type="button" class="btn btn-sm btn-primary" data-loading-text="Hủy Bỏ...">Cancel</button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
</form>
</div>
<!-- end model show chọn group -->

    <?php echo $this->Html->script(array('app.v2','fuelux/fuelux','datepicker/bootstrap-datepicker','slider/bootstrap-slider','file-input/bootstrap.file-input','combodate/moment.min','combodate/combodate','parsley/parsley.min','select2/select2.min','custom','jquery-2.1.1.min'),array('inline'=>false)); ?>